function model = train_svm(tr_data, tr_label, te_data, te_label, C_param, gamma_param, coef0_param, dergree_param, kernel_param)

%RUN_SVM Runs svm using radial basis kernel with the given C, gamma, 
%coefficient0 and the degree as parameters.
    if (kernel_param==1)
        option_str = sprintf('-t %d -c %d -g %f -r %f -d %d', kernel_param, C_param, gamma_param, coef0_param, dergree_param);
    else if (kernel_param==3)
        option_str = sprintf('-t %d -c %d -g %f', kernel_param, C_param, gamma_param);
            
    model = svmtrain(tr_label, tr_data, option_str);
end

